package cc.vv.btpartyjob.partymanager.delegate

import android.widget.TextView
import cc.vv.baselibrary.view.BaseTopBarView
import cc.vv.btpartyjob.partymanager.R
import cc.vv.btpartyjob.partymanager.inter.LookBigPicFileInterface
import cc.vv.btpartyjob.partymanager.view.OnlySelectedFileShowView
import cc.vv.mvp.delegate.BaseAppDelegate

/**
 * 添加工作情况托管类
 * Created by Chen.qi on 2018/10/27.
 */
class WorkQingKuangDetailActivityDelegate : BaseAppDelegate() {

    override fun initWidget() {

    }

    override fun initLayoutRes(): Int {
        return R.layout.activity_work_qingkuang_detail
    }

    /**设置标题title*/
    fun setTopBarTitle(topBarTitle: String) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_awqDd_topBar)
        titleBar?.setTitle(topBarTitle)
    }


    /**设置标题右边按钮点击事件*/
    fun setTitleBackBtnOnClick(event: BaseTopBarView.EventInterface) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_awqDd_topBar)
        titleBar?.setEventInterface(event)
    }


    /**
     * 设置时间
     */
    fun setTime(str: String?) {
        val view = getView<TextView>(R.id.tv_awqDd_time)
        view?.text = str
    }

    /**
     * 设置标题
     */
    fun setTitle(str: String?) {
        val view = getView<TextView>(R.id.tv_awqDd_title)
        view?.text = str
    }

    /**
     * 设置内容
     */
    fun setContent(str: String?) {
        val view = getView<TextView>(R.id.tv_awqDd_content)
        view?.text = str
    }


    /**
     * 设置图片
     */
    fun onlyShowQianDao(deletedSelectedImageInter: LookBigPicFileInterface, arrayList: ArrayList<String>?) {
        val view = getView<OnlySelectedFileShowView>(R.id.sfs_awqDd_pic)
        view?.setDeletedSelectedImageInter(deletedSelectedImageInter, 0)
        view?.addAllSelectedFileView(arrayList, 3)
    }


}